public class t63 {//不同路径2
    public static void main(String[] args) {
        int arr[][]= {{0,0,0},{0,1,0},{0,0,0}};
        if(arr[0][0] ==1){
            //return 0;
            System.out.println(0);
        }
        int n = arr.length;
        int m = arr[0].length;
        int dp[][] = new int [n][m];
        dp[0][0] = 1;
        for(int i = 0;i<n;i++){
            for(int j =0;j<m;j++){
                if(arr[i][j] == 1){
                    dp[i][j] = 0;
                    continue;
                }
                if(i>0){
                    dp[i][j] +=dp[i-1][j];
                }
                if(j>0){
                    dp[i][j] +=dp[i][j-1];
                }

            }
        }
        //return dp[n-1][m-1];
        System.out.println(dp[n-1][m-1]);
    }
}
